let lis = document.querySelectorAll("li");
let imgs = document.querySelectorAll("img");
imgs.forEach((img) => {
  img.style.opacity = 0;
});
let now = 0;
imgs[now].style.opacity = 1;
lis.forEach((li, idx) => {
  li.addEventListener("click", () => {
    imgs[now].style.opacity = 0;
    imgs[idx].style.opacity = 1;
    now = idx;
  });
});
